import request from '@/utils/request'
import { Pagination } from '@/types/global';

// 操作日志数据
export interface SysLogData {
  id?: number;
  sysUserId?: number;
  createTime?: string;
  username?: string;
  ip?: string;
  address?: string;
  browser?: string;
  title?: string;
  operation?: string;
  result?: string; // 备注
}

// 查询操作日志
export interface SysLogParams extends Partial<SysLogData> {
  current?: number;
  size?: number;
  startDate?: string;
  endDate?: string;
}

// 操作日志列表
export function pageSysLog(params: any) {
  return request('get', '/sys-log/page', { params })
}

// 删除操作日志
export function deleteSysLog(operId: any) {
  return request('delete', '/sys-log/' + operId)
}

// 清空操作日志
export function cleanSysLog() {
  return request('delete', '/sys-log/clean')
}
